export class PlatformUserAccountService {
  constructor(opt) {
    this.requestFactory = opt.requestFactory;
    this.sequelize = opt.sequelize;
  }

  async getFirstAccountUser(id) {
    try {
      const response = await this.requestFactory.request({
        url: '/work_ai/user/platformAccount/user/info',
        params: {
          id
        }
      });
      
      return response.data;
    } catch (error) {
      console.error('Error fetching account user info:', error);
    }

    return null;
  }

  async updateAccountUserStatus(id, status) {
    console.log('updateAccountUserStatus', id, status)
    
    return this.requestFactory.request({
      url: '/work_ai/user/platformAccount/user/update',
      method: 'PUT',
      data: {
        id,
        status
      }
    });
  }
}